/* ************************************************************************
> File Name:     binarytree.h
> Author:        zhfu
> mail:          3346897597@qq.com
> Created Time:  2022年05月04日 星期三 10时49分41秒
> Description:   
 ************************************************************************/
#ifndef BINARYTREE_H
#define BINARYTREE_H

typedef struct node *link;
struct node
{
    unsigned char item;
    link l, r;
};

link init(unsigned char VLR[], unsigned char LVR[], int n);
void pre_order(link t, void (*visit) (link));
void in_order(link t, void (*vistt) (link));
void post_order(link t, void (*visit) (link));
int count(link t);
int depth(link t);
void destroy(link t);

#endif
